7.1 Introduction to Electronic Spreadsheets
An electronic spreadsheet is a computer application that consists of multiple rows and columns, based on the model of square-ruled books. It allows you to perform calculations easily and accurately.
Figure 7.1: Electronic Spreadsheet concept based on square-ruled books
7.1.1 What Can You Do with Spreadsheets?
- β Simple and complex calculations - From basic addition to advanced mathematical operations
- π Presentation of data in charts - Visual representation of your data
- β¬οΈβ¬οΈ Sort data - Show data in ascending and descending order
- π Filter data - Segregate only the required data
- β Data validation - Check the validity of data
- π Protection - Protect data using passwords
- πΎ Storage - Save for future use
7.1.2 Popular Spreadsheet Software
| Software | Company/Organization | Type |
|---|---|---|
| Microsoft Excel | Microsoft Corporation | Commercial |
| LibreOffice Calc | The Document Foundation | Free & Open Source |
| Numbers | Apple Inc. | Commercial (Mac/iOS) |
| OpenOffice Calc | Apache Foundation | Free & Open Source |
- Microsoft Excel 2010:
Start β Programs β Microsoft Office β Microsoft Office Excel 2010 - LibreOffice Calc:
Start β Programs β LibreOffice β LibreOffice Calc
7.2 User Interface and Components
7.2.1 Microsoft Excel 2010 Interface
Figure 7.2: Microsoft Excel 2010 User Interface with labeled components
| Component | Function |
|---|---|
| 1. Quick Access Toolbar | Contains commonly used commands like Save, Undo, Redo, Print Preview, New |
| 2. Title Bar | Shows the name of the application and the current file name |
| 3. Ribbon | Contains tabs with commands (Home, Insert, Page Layout, Formulas, Data, Review, View) |
| 4. Help | Provides help functions and documentation |
| 5. Control Buttons | To minimize, maximize/restore, or close the worksheet window |
| 6. Insert Function | Opens dialog box to create and insert formulas |
| 7. Tabs | Changes the ribbon display to show different command groups |
| 8. Formula Bar | Displays the contents and formulas of the active cell |
| 9. Column Headings | Shows column names (A, B, C, ...) |
| 10. Name Box | Shows the address of the active cell |
| 11. Vertical Scroll Bar | Scrolls the worksheet vertically (up and down) |
| 12. Active Cell | The currently selected cell (displays with a thick border) |
| 13. Row Headings | Shows row numbers (1, 2, 3, ...) |
| 14. Sheet Tabs | Represents different worksheets in the workbook (Sheet1, Sheet2, etc.) |
| 15. Horizontal Scroll Bar | Scrolls the worksheet horizontally (left and right) |
| 16. Worksheet Navigation | Buttons to navigate between worksheets |
| 17. Status Bar | Displays worksheet status and quick calculations (Sum, Average, Count) |
| 18. View Buttons | Enables changing the view of the worksheet (Normal, Page Break, Page Layout) |
| 19. Zoom Control | Zooms in or zooms out the view of the worksheet |
7.2.2 LibreOffice Calc Interface
Figure 7.3: LibreOffice Calc User Interface with labeled components
| Component | Function |
|---|---|
| 1. Title Bar | Shows the name of the application software and file |
| 2. Menu Bar | Helps to select commands (File, Edit, View, Insert, Format, Tools, Data, Window, Help) |
| 3. Standard Toolbar | Useful to select standard tools (New, Open, Save, Print, etc.) |
| 4. Control Buttons | Minimizes, maximizes, or closes the worksheet window |
| 5. Name Box | Shows the address of the active cell |
| 6. Insert Function | Opens dialog box to create formulas |
| 7. Formula Bar | To view formulas and display the contents of a cell |
| 8. Formatting Toolbar | Helps to format worksheet (font, size, bold, italic, alignment, etc.) |
| 9. Active Cell | Displays the cell in which data is entered |
| 10. Column Headings | Shows column names |
| 11. Vertical Scroll Bar | Scrolls worksheet vertically |
| 12. Row Headings | Shows row numbers |
| 13. Horizontal Scroll Bar | Scrolls worksheet horizontally |
| 14. Sheet Tabs | Represents different worksheets |
| 15. Tab Scroll Button | Changes between worksheets |
| 16. Status Bar | Displays the status of the worksheet |
| 17. Zoom Control | Zooms in or zooms out the view of worksheet |
7.2.3 Worksheet Structure
A worksheet is made up of a multitude of cells created by the intersection of columns and rows on a two-dimensional plane. Each worksheet is denoted by a sheet tab.
Column Naming in Worksheets
Each column of a worksheet is assigned an English letter or a combination of letters:
- Single letters: A, B, C, D, ... up to Z
- Double letters: AA, AB, AC, AD, ... up to AZ
- Then: BA, BB, BC, BD, ... up to BZ
- And so on...
Row Naming in Worksheets
Each row of a worksheet is assigned a row number: 1, 2, 3, 4, 5, ...
Figure 7.4: Positions of rows and columns in a worksheet
The number of rows and columns in a worksheet is usually a power of two!
| Worksheet Application | Number of Rows | Number of Columns |
|---|---|---|
| Microsoft Excel 2003 | 65,536 (216) | 256 (28) |
| Microsoft Excel 2007/2010 | 1,048,576 (220) | 16,384 (214) |
| LibreOffice Calc 4.1 | 1,048,576 (220) | 1,024 (210) |
7.2.4 Active Cell
A cell must be selected before entering data in it. The currently selected cell is called an active cell. An active cell always has a thick border around it.
Figure 7.5: Active cell (B3) shown with thick border
7.2.5 Cell Address
A cell address is denoted first by the column letter and secondly by the row number. The address of the active cell is displayed in the Name Box.
Example: A cell at column D and row 3 would be named D3
Figure 7.6: Cell address D3 shown in Name Box
Quick Activity
The cell address KD74 is situated in row number ______ and column letter ______.
Answer: Row 74, Column KD
7.2.6 Range of Cells
A block of adjacent cells in a worksheet that is highlighted or selected is called a range of cells.
Types of Cell Ranges:
| Type | Example | Description | Constant |
|---|---|---|---|
| Column Range | B2:B5 | Range along a column (cells B2, B3, B4, B5) | Column letter is constant |
| Row Range | A3:C3 | Range along a row (cells A3, B3, C3) | Row number is constant |
| Block Range | B2:C4 | Range spanning rows and columns (cells B2, B3, B4, C2, C3, C4) | Both vary |
Figure 7.7: Different types of cell ranges in a worksheet
Use the Ctrl key to select more than one non-adjacent range of cells in a worksheet.
7.2.7 Navigation in Worksheet
The active cell in a worksheet can be moved and selected using keyboard keys or key combinations:
| Key/Combination | Result |
|---|---|
| Arrow Keys | Move one cell in any direction (left, right, up, down) |
| Ctrl + Arrow Keys | Moves to the end of the data range in that direction |
| Home | Moves to column A along the row where the active cell is |
| Ctrl + Home | Moves to cell A1 |
| Ctrl + End | Moves to the bottom-right cell of the data range |
| Page Up | Moves the worksheet one screen up |
| Page Down | Moves the worksheet one screen down |
7.3 Entering Data in Worksheets
Before entering data in a worksheet, you must select the required cell. The contents of a cell can be one of three types:
7.3.1 Labels (Text)
A combination of letters, numbers, special symbols, or text entered using a keyboard are called labels.
Default Alignment: Labels are left-aligned by default.
Figure 7.8: Labels in a worksheet are left-aligned
Telephone numbers starting with 0 will not be displayed correctly (the first 0 is not shown). You need to format the cells as 'Text' before entering phone numbers. This will be discussed in the formatting section.
7.3.2 Values (Numbers)
Data with numerical figures are called values.
Default Alignment: Values are right-aligned by default.
Figure 7.9: Values in a worksheet are right-aligned
When entering fraction numbers (like 2Β½), enter a space after the whole number. For example: 2 1/2
7.3.3 Formulas
Expressions beginning with an equals sign = using values, cell addresses, and functions are called formulas.
Display: When a formula is entered in a cell:
- The result is displayed in the cell
- The formula is shown in the Formula Bar
Figure 7.10: Formula shown in Formula Bar, result shown in cell
Example: Adding Two Cells
To get the total value of cells A1 and B1 into cell C1:
7.4 Mathematical Operators and Formulas
7.4.1 Mathematical Operators Used in Formulas
| Operator | Meaning | Example | Result |
|---|---|---|---|
+ |
Addition | =2+4 | 6 |
- |
Subtraction | =5-2 | 3 |
* |
Multiplication | =4*5 | 20 |
/ |
Division | =12/6 | 2 |
^ |
Exponentiation (Power) | =2^4 | 16 |
The order of evaluation can be changed by using brackets ( ). Expressions within brackets are evaluated first!
7.4.2 Operator Precedence (Order of Operations)
- First:
^(Exponentiation) - Second:
*and/(Multiplication and Division) - left to right - Third:
+and-(Addition and Subtraction) - left to right
Remember: When brackets are not used, operators at the same level (like * and /, or + and -) are executed from left to right.
Examples with Brackets:
| Formula | Evaluation Steps | Result |
|---|---|---|
| =2+4*3 | =2+12 | 14 |
| =(2+4)*3 | =6*3 | 18 |
| =4*3^2 | =4*9 | 36 |
| =(4*3)^2 | =12^2 | 144 |
Complex Formula Evaluation Examples:
Example 1: =5+2*3^2/6-3
Example 2: =5+2*3^2/(6-3)
Example 3: =8/2*3-2^3+5
Practice Activity: Evaluate These Formulas
- =6-4/2 (Answer: 4)
- =5*4+3 (Answer: 23)
- =3+4*5 (Answer: 23)
- =2^5+3 (Answer: 35)
- =3+5^2 (Answer: 28)
- =4+5*2^3 (Answer: 44)
- =8/4*2 (Answer: 4)
- =-4/2+2 (Answer: 0)
- =1+2^2*3 (Answer: 13)
- =3*4/2 (Answer: 6)
- =5/2+1^3*4 (Answer: 6.5)
- =3-4*3/2 (Answer: -3)
- =6/3*2^1-3 (Answer: 1)
- =3*(2+4)/9+1 (Answer: 3)
- =2^3/(5-1)^3*5 (Answer: 0.625)
7.4.3 Formulas with Cell Addresses and Operators
When the values in the referenced cells change, the results obtained from the formulas automatically update! This is the power of spreadsheets.
Example 1: Rectangle Perimeter and Area
Calculate the perimeter and area of a rectangle when length and breadth are given:
Try it: Change the values in A2 and B2, and watch the results update automatically!
Example 2: Price Calculation
Calculate the total cost of pencils and books:
Example 3: Cube Surface Area and Volume
Calculate the surface area and volume of a cube:
D2=A2*B2 β WRONG! This is treated as text (label), not a formula.
=A2*B2 β
CORRECT! This is treated as a formula.
Remember: Always start formulas with = and never write anything on the left side of the equals sign!
The results obtained from a formula (based on cell addresses) always get updated automatically when the values of the cells mentioned in the formula change. This is what makes spreadsheets so powerful!
7.5 Using Functions for Calculations
When there is a large quantity of data, it becomes difficult and complex to write formulas using only cell addresses. Functions make calculations simpler and more efficient!
7.5.1 Common Spreadsheet Functions
| Function | Syntax | Purpose |
|---|---|---|
| SUM | =SUM(Number1,Number2,...) | Adds the values contained in a range of cells |
| AVERAGE | =AVERAGE(Number1,Number2,...) | Finds the average of the values in a range of cells |
| MAX | =MAX(Number1,Number2,...) | Finds the largest value in a range of cells |
| MIN | =MIN(Number1,Number2,...) | Finds the smallest value in a range of cells |
| COUNT | =COUNT(Number1,Number2,...) | Counts the number of cells containing numbers within a range |
Comparison: Cell Addresses vs Functions
Method 1 - Using Cell Addresses (Long way):
Method 2 - Using Function (Short way):
β Both methods give the same result, but Method 2 is much simpler and easier, especially with large data ranges!
7.5.2 Sample Worksheet for Function Examples
Figure 7.11: Sample worksheet with data for function examples
7.5.3 SUM Function Examples
| Formula | Details | Result |
|---|---|---|
| =SUM(A1,B1,C1) | Sum of cells A1, B1, and C1 | 12 |
| =SUM(A1:C1) | Sum of cells in range from A1 to C1 | 12 |
| =SUM(A1:C1,B2) | Sum of range A1:C1 and cell B2 | 15 |
| =SUM(B1:C2) | Sum of cells in range from B1 to C2 | 20 |
| =SUM(A1:A3,C1:C3) | Sum of two separate ranges | 35 |
7.5.4 AVERAGE Function Examples
| Formula | Details | Result |
|---|---|---|
| =AVERAGE(A1,B1,C1) | Average of cells A1, B1, and C1 | 4.00 |
| =AVERAGE(A1:C1) | Average of cells in range A1:C1 | 4.00 |
| =AVERAGE(A1:C1,B2) | Average of range A1:C1 and cell B2 | 3.75 |
| =AVERAGE(B1:C2) | Average of range B1:C2 | 5.00 |
| =AVERAGE(A1:A3,C1:C3) | Average of two ranges A1:A3 and C1:C3 | 5.83 |
When the average is calculated, a decimal number with several decimal places may be displayed. You can format the cell to show the required number of decimal places (this will be covered in the formatting section).
7.5.5 MAX Function Examples
| Formula | Details | Result |
|---|---|---|
| =MAX(A1,B2,C1) | Largest value among cells A1, B2, and C1 | 6 |
| =MAX(A2:C2,B3) | Largest value in range A2:C2 and cell B3 | 9 |
| =MAX(A1:C1) | Largest value in range A1:C1 | 6 |
| =MAX(A1,B1:C2) | Largest value in range B1:C2 and cell A1 | 7 |
7.5.6 MIN Function Examples
| Formula | Details | Result |
|---|---|---|
| =MIN(A1,B2,C1) | Smallest value among cells A1, B2, and C1 | 2 |
| =MIN(A2:C2,B3) | Smallest value in range A2:C2 and cell B3 | 3 |
| =MIN(A1:C1) | Smallest value in range A1:C1 | 2 |
| =MIN(A1,B1:C2) | Smallest value in range B1:C2 and cell A1 | 2 |
7.5.7 COUNT Function Examples
| Formula | Details | Result |
|---|---|---|
| =COUNT(A1,B1) | Count cells with numbers in A1 and B1 | 2 |
| =COUNT(A1:C1) | Count cells with numbers in range A1:C1 | 3 |
| =COUNT(A1:A4) | Count cells with numbers in range A1:A4 | 3 |
| =COUNT(A1:C1,B2) | Count cells with numbers in A1:C1 and B2 | 4 |
| =COUNT(B1:C3) | Count cells with numbers in range B1:C3 | 6 |
| =COUNT(A1:A3,C1:C3) | Count cells with numbers in two ranges | 6 |
Practice Activity: Student Marks Analysis
Based on the following data, answer the questions:
| Name | Term 1 | Term 2 | Term 3 | Total | Average |
|---|---|---|---|---|---|
| K. Bhanu Somarathne | 75 | 82 | 78 | E2 | F2 |
| Wasantham Jayaraj | 68 | 72 | 70 | E3 | F3 |
- What is the formula to insert in E2 to find total marks for K. Bhanu Somarathne?
Answer: =SUM(B2:D2)
- What is the formula to insert in F3 to find average marks for Wasantham Jayaraj?
Answer: =AVERAGE(B3:D3)
- What is the formula to insert in B8 to find the highest score in Term 1?
Answer: =MAX(B2:B7)
- What is the formula to insert in C8 to count students who appeared for Term 2?
Answer: =COUNT(C2:C7)
- What is the formula to insert in D8 to find lowest score in Term 3?
Answer: =MIN(D2:D7)
7.6 Formatting the Worksheet
Formatting makes your worksheets more readable, professional, and easier to understand. You can format using the formatting toolbar or the Format Cells dialog box.
7.6.1 Formatting Toolbar
Figure 7.12: Formatting toolbar in Excel and Calc
| Tool | Function |
|---|---|
| Font | Apply different font types (Arial, Times New Roman, Calibri, etc.) |
| Font Size | Change font size (8, 10, 12, 14, 16, etc.) |
| Bold (B) | Make selected text bold |
| Italic (I) | Italicize selected text |
| Underline (U) | Underline selected text |
| Left Align | Align text to the left of the cell |
| Center Align | Align text to the center of the cell |
| Right Align | Align text to the right of the cell |
| Vertical Top Alignment | Align text to the top of a cell |
| Vertical Middle Alignment | Align text to the middle of a cell |
| Vertical Bottom Alignment | Align text to the bottom of a cell |
| Orientation | Rotate text to diagonal angle or vertical orientation |
| Number Format | Choose how values in a cell are displayed |
| Increase Decimals | Show more decimal places |
| Decrease Decimals | Show fewer decimal places |
7.6.2 Format Cells Dialog Box
- Excel 2010: Home Tab β Number Group (click the small arrow)
- LibreOffice Calc: Format β Cells
- Shortcut (Both): Right-click on selected cell(s) β Format Cells
Figure 7.13: Format Cells dialog box
7.6.3 Number Formatting Types
1. Formatting with Decimal Places
When division is performed, different numbers of decimal places may appear. Format cells to show a fixed number of decimal places.
Figure 7.14: Numbers formatted to 2 decimal places
Steps to Format Decimal Places:
In Microsoft Excel 2010:
- Select the range of cells
- Open the 'Format Cells' dialog box
- Click the 'Number' tab
- Select 'Number' category
- Change the decimal places as required
- Click 'OK'
In LibreOffice Calc:
- Select the range of cells
- Open the 'Format Cells' dialog box
- Click the 'Number' tab
- Select 'Number' category
- Change the decimal places as required
- Click 'OK'
2. Formatting as Text (for Phone Numbers)
A telephone number consists of 10 digits. When a number starting with 0 is entered, the zero will not be displayed because it's stored as a numeric value. Format cells as 'Text' before entering phone numbers.
Figure 7.15: Phone numbers formatted as text to preserve leading zeros
Steps to Format as Text:
In Microsoft Excel 2010:
- Select the range of cells
- Open the 'Format Cells' dialog box
- Click the 'Number' tab
- Select 'Text' category
- Click 'OK'
- Now enter the phone numbers
In LibreOffice Calc:
- Select the range of cells
- Open the 'Format Cells' dialog box
- Click the 'Number' tab
- Select 'Text' category
- Click 'OK'
- Now enter the phone numbers
3. Formatting as Percentage
Display decimal values as percentages to make them easier to understand.
Figure 7.16: Numbers formatted as percentages
Example: Monthly Profit
| Month | Profit (Decimal) | Profit (Percentage) |
|---|---|---|
| January | 0.15 | 15% |
| February | 0.22 | 22% |
| March | 0.18 | 18% |
Steps to Format as Percentage:
In Microsoft Excel 2010:
- Select the cell range
- Open the 'Format Cells' dialog box
- Click the 'Number' tab
- Select 'Percentage' category
- Change the decimal places as required
- Click 'OK'
4. Formatting as Currency
Display monetary values with currency symbols (Rs., $, β¬, Β£, etc.).
Figure 7.17: Numbers formatted with currency symbols
Steps to Format as Currency:
In Microsoft Excel 2010:
- Select the cell range
- Open the 'Format Cells' dialog box
- Click the 'Number' tab
- Select 'Currency' category
- Choose currency symbol (Rs., $, etc.)
- Click 'OK'
5. Formatting as Date
Display dates in various formats. In computers, the date 5/12/2014 means May 12, 2014 (American format: mm/dd/yyyy).
Figure 7.18: Various date formats
Common Date Formats:
- 5/12/2014 (mm/dd/yyyy)
- 12-May-2014
- May 12, 2014
- 12/05/2014 (dd/mm/yyyy)
- 2014-05-12 (yyyy-mm-dd)
Steps to Format as Date:
In Microsoft Excel 2010:
- Select the range of cells
- Open the 'Format Cells' dialog box
- Click the 'Number' tab
- Select 'Date' category
- Select the date format you want
- Click 'OK'
6. Formatting as Time
Display time in various formats. The common format is hh:mm:ss AM/PM (hours:minutes:seconds).
Figure 7.19: Various time formats
Common Time Formats:
- 10:35:53 AM (12-hour with seconds)
- 10:35 AM (12-hour without seconds)
- 22:35:53 (24-hour with seconds)
- 22:35 (24-hour without seconds)
7. Formatting as Scientific Notation
Spreadsheets can handle very large and very small numbers. Scientific notation makes these numbers easier to understand and express.
Figure 7.20: Numbers in scientific notation
Scientific Notation Examples:
| Standard Form | Scientific Notation |
|---|---|
| 1,500,000 | 1.50E+06 |
| 0.000025 | 2.50E-05 |
| 350,000,000 | 3.50E+08 |
7.6.4 Alignment Formatting
Labels and values can be aligned to the left, center, or right of cells.
| Left Alignment | Center Alignment | Right Alignment |
|---|---|---|
| Text aligned left | Text centered | Text aligned right |
Steps to Format Alignment:
In Microsoft Excel 2010:
- Select the cell range
- Open the 'Format Cells' dialog box
- Click the 'Alignment' tab
- Select left, right, or center for horizontal alignment
- Select top, middle, or bottom for vertical alignment
- Click 'OK'
Formatting Practice Activity
Create a worksheet with the following data and apply formatting:
| Department | January | February | March | Total | Average |
|---|---|---|---|---|---|
| Arts | 120 | 135 | 142 | ? | ? |
| Science | 98 | 105 | 112 | ? | ? |
| Commerce | 156 | 148 | 160 | ? | ? |
Tasks:
- Center align column A and row 1
- Make row 1 Bold
- Underline the heading. Make font size 16
- Italicize cells A2, A3, A4
- Use SUM function to calculate totals
- Use AVERAGE function to calculate averages
- Format averages to 2 decimal places
7.7 Relative and Absolute Cell References
7.7.1 Copying Formulas
One of the most powerful features of spreadsheets is the ability to copy formulas quickly! This makes calculations on large data sets much faster and more efficient.
Fill Handle
The small black square in the bottom-right corner of the selected cell or range is called the fill handle.
Figure 7.21: Fill handle location
Two Methods to Copy Formulas:
Method 1: Using the Fill Handle
- Select the cell containing the formula
- Click on the small black square (fill handle) in the bottom-right corner
- Drag the fill handle up, down, left, or right to the required cells
- Release the mouse button
Method 2: Using Copy and Paste Commands
- Select the cell containing the formula
- Copy the cell (Ctrl+C)
- Select the destination cell(s)
- Paste (Ctrl+V)
7.7.2 Types of Cell References
| Type | Example | Description | What Changes When Copied |
|---|---|---|---|
| Relative Reference | A1 | Normal cell reference | Both column and row change |
| Absolute Row | A$1 | Dollar before row number | Only column changes, row stays fixed |
| Absolute Column | $A1 | Dollar before column letter | Only row changes, column stays fixed |
| Absolute Reference | $A$1 | Dollar before both | Nothing changes - completely fixed |
The dollar sign ($) is used to make cell references absolute. It "locks" the row number or column letter (or both) so they don't change when the formula is copied.
7.7.3 Relative Cell Reference (A1)
If the row number and column letter of cells change accordingly when a formula is copied, such cell addresses are called relative cell references.
Figure 7.22: Relative cell reference example
Example: How Relative References Change
Notice how both the column letters and row numbers adjust relative to the new position!
7.7.4 Absolute Row Reference (A$1)
If the row number stays fixed but the column letter changes when a formula is copied, it's called an absolute row reference.
Figure 7.23: Absolute row reference example
Example: How Absolute Row Works
Practical Example: Price per Pencil
Calculate the price of different quantities of pencils when the unit price is in cell B2:
7.7.5 Absolute Column Reference ($A1)
If the column letter stays fixed but the row number changes when a formula is copied, it's called an absolute column reference.
Figure 7.24: Absolute column reference example
Example: How Absolute Column Works
Practical Example: Cumulative Cricket Runs
Calculate cumulative runs after each over:
7.7.6 Absolute Cell Reference ($A$1)
If both the column letter and row number stay completely fixed when a formula is copied, it's called an absolute cell reference.
Figure 7.25: Absolute cell reference example
Example: How Absolute Reference Works
Practical Example: Book Price Table
Calculate book prices for different quantities and dozens, using a fixed unit price:
7.7.7 Quick Reference Summary
| Reference Type | When to Use | Real-World Example |
|---|---|---|
| A1 (Relative) |
Normal formulas that adjust in all directions | Adding adjacent cells, calculating totals in tables |
| A$1 (Absolute Row) |
Fixed row with changing columns | Multiplying by prices/rates in a header row |
| $A1 (Absolute Column) |
Fixed column with changing rows | Cumulative totals, running balances |
| $A$1 (Absolute) |
One fixed value used everywhere | Tax rate, discount %, currency conversion rate |
Practice Activity: Cell References
Question 1: If cell C1 contains =A1*B1, what will appear in C3 after copying?
Answer: =A3*B3 (relative reference adjusts)
Question 2: If cell D2 contains =A$2*D1, what will appear in E3 after copying?
Answer: =A$2*E2 (A$2 stays fixed, D1 adjusts)
Question 3: If cell C3 contains =$B3*C$1, what will appear in D4 after copying?
Answer: =$B4*D$1 (B column fixed, row 1 fixed)
Question 4: When should you use $A$1?
Answer: When you have a single fixed value (like tax rate, discount) that you want to use in many different calculations
Question 5: What's the difference between A$1 and $A1?
Answer: A$1 keeps row 1 fixed (column can change), $A1 keeps column A fixed (row can change)
7.8 Creating Charts Using Spreadsheets
It's not easy to comprehend, compare, analyze, or present data when represented only as numbers. Charts are visual representations that make data:
- π Easier to understand - See patterns at a glance
- π Better for comparison - Compare values visually
- π― More effective for presentation - Communicate clearly
- π‘ Better for decision-making - Identify trends quickly
7.8.1 Types of Charts
Figure 7.26: Different types of charts available
| Chart Type | Best Used For | Example Uses |
|---|---|---|
| Column Chart | Comparing values across categories (vertical bars) | Monthly sales, test scores, population by city |
| Bar Chart | Comparing values across categories (horizontal bars) | Survey results, rankings, product comparisons |
| Line Chart | Showing trends and changes over time | Temperature changes, stock prices, growth trends |
| Pie Chart | Showing parts of a whole (percentages) | Budget breakdown, market share, survey responses |
| XY Scatter Chart | Showing relationship between two variables | Height vs weight, study time vs marks, mathematical functions |
Quick Activity: Choose the Right Chart
1. Which chart type would you use to show monthly temperature changes?
Answer: Line Chart (shows trend over time)
2. Which chart type shows how a school budget is distributed?
Answer: Pie Chart (shows parts of a whole)
7.8.2 Creating a Column Chart
Example: Student Marks Column Chart
Figure 7.27: Column chart showing student marks
Sample Data:
| Student | Math | Science | English |
|---|---|---|---|
| Ravidu | 75 | 82 | 78 |
| Nadeshean | 88 | 76 | 85 |
| Dinithi | 92 | 89 | 90 |
Steps to Create Column Chart:
In Microsoft Excel 2010:
- Select the data range (A1:D4) including headers
- Click Insert β Chart
- Select Column Chart type
- Choose a specific column chart style
- Click OK
In LibreOffice Calc:
- Select the data range (A1:D4) including headers
- Click Insert β Chart
- Select Column chart type
- Click Next through the wizard
- Click Finish
Adding Chart Title:
In Microsoft Excel 2010:
- Select the chart
- Click Layout β Chart Title β Above Chart
- Type the title (e.g., "Student Marks Comparison")
In LibreOffice Calc:
- Select the chart
- Click Insert β Title β Main Title
- Type the title
- Click OK
Adding Axis Labels:
In Microsoft Excel 2010:
- Select the chart
- Click Layout β Axis Titles
- Choose Primary Horizontal Axis Title or Primary Vertical Axis Title
- Type the axis label
In LibreOffice Calc:
- Select the chart
- Click Insert β Title β X-Axis or Y-Axis
- Type the axis label
- Click OK
7.8.3 Creating a Pie Chart
Example: Total Marks Distribution
Figure 7.28: Pie chart showing total marks distribution
Steps to Create Pie Chart:
In Microsoft Excel 2010:
- Select non-adjacent ranges:
- Hold Ctrl and select student names (A1:A7)
- While holding Ctrl, select total marks (G1:G7)
- Click Insert β Chart
- Select Pie chart type
- Choose a pie chart style (2D or 3D)
- Click OK
In LibreOffice Calc:
- Select student names and total marks (use Ctrl for non-adjacent)
- Click Insert β Chart
- Select Pie chart type
- Click through the wizard
- Click Finish
- Pie charts automatically calculate and show percentages
- Best for showing 3-7 categories (too many slices get confusing)
- Great for showing proportions and relative sizes
- Can add data labels to show exact values or percentages
7.8.4 Creating an XY Scatter Chart
Example: Quadratic Function Y = XΒ² - 5X - 3
Figure 7.29: XY Scatter chart showing quadratic function
Steps to Create Data:
- Step 1: Enter X values in row 1 (from -2 to 7)
- Step 2: In cell B2, enter formula:
=B1^2-5*B1-3 - Step 3: Copy formula from B2 across to K2
- Step 4: Select data range A1:K2
- Step 5: Insert β Chart β XY Scatter
- Step 6: Choose "Scatter with Smooth Lines"
- β Always include clear, descriptive titles
- β Label both axes appropriately
- β Choose colors that are easy to distinguish
- β Use legends to identify different data series
- β Keep charts simple and focused on the message
- β Update the data range if you add more data
- β Choose the right chart type for your data
- β Don't overcrowd charts with too much data
- β Don't use 3D effects unless necessary (can distort perception)
7.9 Practical Examples
Example 1: Student Grade Calculator
Task: Calculate total, average, and assign grades based on average marks
| Name | Math | Science | English | Total | Average | Grade |
|---|---|---|---|---|---|---|
| Saman | 75 | 82 | 78 | =SUM(B2:D2) | =AVERAGE(B2:D2) | =IF(F2>=75,"A",IF(F2>=65,"B","C")) |
Example 2: Monthly Budget Tracker
Task: Track monthly income, expenses, and calculate savings
Example 3: Discount Calculator
Task: Calculate discounted prices for multiple items
Example 4: Temperature Converter
Task: Convert Celsius to Fahrenheit and Kelvin
Example 5: Attendance Percentage Calculator
Task: Calculate attendance percentage for students
Example 6: Simple Interest Calculator
Task: Calculate simple interest and total amount
Example 7: BMI (Body Mass Index) Calculator
Task: Calculate BMI and categorize health status
Example 8: Sales Commission Calculator
Task: Calculate sales commission for employees
Example 9: Age Calculator from Birth Date
Task: Calculate current age from birth date
Example 10: Electricity Bill Calculator
Task: Calculate electricity bill based on meter readings
7.10 Practice Activities
Activity 1: Personal Information Sheet
Objective: Practice data entry and text formatting
Task: Create a worksheet with information for 5 friends:
- Columns: Name, Age, Birthday, Phone Number, Email
- Format phone numbers as Text (to preserve leading 0)
- Format birthdays as Date (DD-MMM-YYYY format)
- Center-align all headers and make them Bold
- Apply borders to the entire table
Activity 2: Multiplication Table Generator
Objective: Practice absolute and relative references
Task: Create a 10Γ10 multiplication table:
- Put numbers 1-10 in column A (A2:A11)
- Put numbers 1-10 in row 1 (B1:K1)
- In cell B2, enter formula:
=$A2*B$1 - Copy this formula to the entire range B2:K11
- Apply formatting: borders, bold headers, color coding
Expected Result: A complete multiplication table from 1Γ1 to 10Γ10
Activity 3: Shopping List with Total
Objective: Practice formulas and currency formatting
Task: Create a shopping list:
- Columns: Item Name, Quantity, Unit Price, Total Price
- Add at least 8 different items
- Formula for Total Price:
=Quantity Γ Unit Price - Calculate Grand Total using
=SUM()function - Format all prices as Currency (Rs.)
- Add a row for discount (if total > 5000, apply 10% discount)
Activity 4: Class Test Analysis Dashboard
Objective: Practice functions and create charts
Task: Enter test marks for 10 students in 3 subjects:
- Calculate Total for each student using
=SUM() - Calculate Average for each student using
=AVERAGE() - Find Highest score in each subject using
=MAX() - Find Lowest score in each subject using
=MIN() - Count number of students using
=COUNT() - Create a Column Chart showing student totals
- Create a Line Chart showing subject averages
Activity 5: Monthly Expense Tracker
Objective: Practice data organization and pie charts
Task: Track expenses for a month:
- Categories: Food, Transport, Entertainment, Education, Bills, Others
- Enter expenses for 4 weeks
- Calculate Total per Category
- Calculate Total per Week
- Calculate Grand Total for the month
- Create a Pie Chart showing expense distribution by category
- Format all amounts as currency
Activity 6: School Time Table
Objective: Practice formatting and layout design
Task: Create your school weekly timetable:
- Rows: Time periods (8:00 AM, 9:00 AM, ..., 2:00 PM)
- Columns: Monday to Friday
- Fill in subjects for each period
- Use different background colors for different subjects
- Merge cells for lunch break or double periods
- Add borders and make it visually appealing
- Add your name and class as a header
Activity 7: Weekly Temperature Log with Chart
Objective: Practice data recording and line charts
Task: Record daily temperatures for a week:
- Columns: Date, Morning Temp (Β°C), Afternoon Temp (Β°C), Evening Temp (Β°C), Average
- Calculate Average temperature for each day
- Find Maximum temperature for the week
- Find Minimum temperature for the week
- Calculate Weekly Average
- Create a Line Chart showing temperature trends across the week
- Include all three time periods on the chart
Activity 8: Library Book Inventory
Objective: Practice data management and calculations
Task: Create a book inventory system:
- Columns: Book ID, Title, Author, Category, Quantity, Price per Book, Total Value
- Add at least 15 books with different categories (Fiction, Science, History, etc.)
- Calculate Total Value:
=Quantity Γ Price - Calculate Total Books using
=SUM()of quantity - Find Most Expensive book using
=MAX() - Find Cheapest book using
=MIN() - Calculate Total Inventory Value
Activity 9: Savings Goal Tracker
Objective: Practice cumulative calculations with absolute references
Task: Track progress toward a savings goal:
- Set a savings goal amount in cell B1 (e.g., Rs. 50,000)
- Columns: Week Number, Amount Saved, Cumulative Savings, % of Goal Achieved
- Enter weekly savings amounts (12 weeks)
- Calculate Cumulative Savings using:
=SUM($C$2:C2) - Calculate % Achieved:
=(Cumulative/Goal)*100 - Use conditional formatting to highlight when goal is achieved
- Create a Column Chart showing progress over time
Activity 10: Sports Statistics Tracker
Objective: Practice sports data analysis
Task: Record cricket match statistics:
- Columns: Player Name, Runs Scored, Balls Faced, Strike Rate, Wickets, Economy Rate
- Calculate Strike Rate:
=(Runs/Balls)*100 - Find Top Scorer using
=MAX() - Find Best Strike Rate
- Calculate Team Total runs using
=SUM() - Calculate Average runs per player
- Create a Bar Chart showing player performances
- Format strike rate as percentage with 2 decimal places
7.11 Questions and Answers
Question 1: What is an electronic spreadsheet?
Answer:
An electronic spreadsheet is a computer application consisting of rows and columns (based on the model of square-ruled books) that allows users to:
- Perform calculations efficiently and accurately
- Analyze and organize data
- Create charts and visual representations
- Sort and filter information
- Store data for future use
Question 2: Name four popular spreadsheet software applications and their companies.
Answer:
- Microsoft Excel - Microsoft Corporation
- LibreOffice Calc - The Document Foundation (Free & Open Source)
- Numbers - Apple Inc.
- OpenOffice Calc - Apache Foundation (Free & Open Source)
Question 3: What is the cell address for the cell at column F and row 12?
Answer: F12
Explanation: Cell addresses are written with the column letter first, followed by the row number. So column F and row 12 = F12.
Question 4: What is an active cell and how can you identify it?
Answer:
An active cell is the currently selected cell in a worksheet where data can be entered.
You can identify it by:
- The thick border around the cell
- The cell address displayed in the Name Box
- The cell contents shown in the Formula Bar
Question 5: Write the cell range for cells from B5 to D10.
Answer: B5:D10
Explanation: A cell range is written with the first cell address, followed by a colon (:), then the last cell address. This range includes all cells from B5 to D10, covering columns B, C, and D, and rows 5 through 10.
Question 6: What are the three types of data that can be entered in a cell?
Answer:
- Labels (Text): Letters, words, text combinations - left-aligned by default
- Example: "Student Name", "Address", "Product"
- Values (Numbers): Numerical figures - right-aligned by default
- Example: 100, 3.14, 2500
- Formulas: Expressions starting with = sign that perform calculations
- Example: =A1+B1, =SUM(A1:A10)
Question 7: What is the correct order of operator precedence in spreadsheet formulas?
Answer:
Order of Operator Precedence (from highest to lowest):
- First:
^(Exponentiation/Power) - Second:
*and/(Multiplication and Division, evaluated left to right) - Third:
+and-(Addition and Subtraction, evaluated left to right)
Important: Use brackets ( ) to change the order - expressions in brackets are evaluated first!
Remember: Please Excuse My Dear Aunt Sally (Parentheses, Exponents, Multiplication/Division, Addition/Subtraction)
Question 8: Evaluate the following formula: =5+3*2^2
Answer: 17
Step-by-step solution:
Question 9: What is the formula to find the sum of cells A1 to A10 using a function?
Answer: =SUM(A1:A10)
Explanation:
This is much simpler and cleaner than writing:
=A1+A2+A3+A4+A5+A6+A7+A8+A9+A10
Both give the same result, but the SUM function is easier to write and understand, especially for large ranges.
Question 10: What is the difference between MAX and MIN functions?
Answer:
| Function | Purpose | Example |
|---|---|---|
| MAX | Finds the largest (maximum) value in a range | =MAX(A1:A10) finds the highest value |
| MIN | Finds the smallest (minimum) value in a range | =MIN(A1:A10) finds the lowest value |
Question 11: What does the COUNT function do? Does it count empty cells?
Answer:
The COUNT function counts the number of cells that contain numerical values in a specified range.
Important: COUNT function:
- β Counts cells with numbers
- β Ignores empty cells
- β Ignores cells with text/labels
Example: =COUNT(B1:B10) will count how many cells in B1:B10 contain numbers.
Question 12: Why should phone numbers be formatted as text in spreadsheets?
Answer:
Phone numbers should be formatted as text because:
- Phone numbers in Sri Lanka (and many countries) start with 0
- When entered as numbers, spreadsheets automatically remove leading zeros (because 0771234567 = 771234567 mathematically)
- Example: 0771234567 becomes 771234567 (losing the important 0)
- Formatting as text preserves the leading zero and displays the number exactly as entered
How to format: Select cells β Format Cells β Number tab β Text β OK β Then enter phone numbers
Question 13: How do you format cells to show exactly 2 decimal places?
Answer:
Steps:
- Select the cell range you want to format
- Open Format Cells dialog box (Right-click β Format Cells)
- Click the 'Number' tab
- Select 'Number' category
- Set decimal places to 2
- Click OK
Quick method: Use the Increase/Decrease Decimal buttons on the toolbar.
Example: 12.56789 will display as 12.57 (rounded to 2 decimal places)
Question 14: What are the four types of cell references? Give examples of each.
Answer:
| Type | Example | What Changes When Copied | Use Case |
|---|---|---|---|
| Relative | A1 | Both column and row change | Normal formulas |
| Absolute Row | A$1 | Only column changes, row fixed | Fixed header row |
| Absolute Column | $A1 | Only row changes, column fixed | Cumulative totals |
| Absolute | $A$1 | Nothing changes - completely fixed | Tax rate, discount % |
Question 15: If cell C1 contains =A1+B1, what will C2 contain when the formula is copied down?
Answer: =A2+B2
Explanation:
Since A1 and B1 are relative references (no $ signs), both the column letters and row numbers adjust when copied.
When copied down one row:
- A1 becomes A2 (row increases by 1)
- B1 becomes B2 (row increases by 1)
Question 16: What is the difference between =A$1+B1 and =$A1+B1?
Answer:
| Formula | Type | What's Fixed | When Copied Right | When Copied Down |
|---|---|---|---|---|
| =A$1+B1 | Absolute Row | Row 1 is fixed | =B$1+C1 | =A$1+B2 |
| =$A1+B1 | Absolute Column | Column A is fixed | =$A1+C1 | =$A2+B2 |
Key Difference:
A$1: $ before row number β row stays fixed, column can change$A1: $ before column letter β column stays fixed, row can change
Question 17: Name the five types of charts available in spreadsheets.
Answer:
- Column Chart - Vertical bars for comparing categories
- Bar Chart - Horizontal bars for comparing categories
- Line Chart - Shows trends over time
- Pie Chart - Shows parts of a whole as percentages
- XY Scatter Chart - Shows relationship between two variables
Question 18: Which chart type is best for showing monthly temperature changes over a year?
Answer: Line Chart
Reason:
- Line charts are ideal for showing trends and changes over time
- They clearly display how temperature rises and falls across months
- The continuous line makes it easy to see patterns and seasonal changes
- Good for identifying trends (warming/cooling patterns)
Why not other charts?
- Column/Bar: Good for comparison but not as effective for trends
- Pie: Only shows proportions, not appropriate for time series
- Scatter: Used for correlation between variables, not time series
Question 19: How many rows and columns does Microsoft Excel 2010 have?
Answer:
| Component | Count | Power of 2 |
|---|---|---|
| Rows | 1,048,576 | 220 |
| Columns | 16,384 | 214 |
Additional Info:
- Rows are numbered: 1, 2, 3, ... up to 1,048,576
- Columns are labeled: A to Z, then AA to AZ, BA to BZ, ... up to XFD
- Last column is XFD
- Last cell address is XFD1048576
Question 20: What is the fill handle and how is it used to copy formulas?
Answer:
What is the Fill Handle?
The fill handle is the small black square in the bottom-right corner of the selected cell or range.
How to use it to copy formulas:
- Select the cell containing the formula
- Move your mouse to the bottom-right corner until you see the black crosshair (+)
- Click and hold the left mouse button
- Drag the fill handle down, up, left, or right to the cells where you want to copy the formula
- Release the mouse button
What happens?
- The formula is copied to all selected cells
- Cell references adjust automatically (relative references)
- Absolute references (with $) remain fixed
Tip: Double-click the fill handle to auto-fill down to the last row with adjacent data!
π Chapter Summary
π― Key Concepts to Remember:
- β A worksheet is composed of vertical columns and horizontal rows in a two-dimensional plane
- β Columns are named with English letters (A, B, C, ... Z, AA, AB, ...)
- β Rows are named with numbers (1, 2, 3, 4, ...)
- β Cells are named firstly by column letter, secondly by row number (e.g., D3)
- β Cell content can be: Label, Value, or Formula
- β A formula is initiated with an equals sign (=)
- β
There is a precedence of operators:
^then*//then+/- - β Formulas are created using cell addresses, operators, and functions
- β Formatting tools are used to format labels and values professionally
- β The fill handle (small black square) is used to copy formulas efficiently
- β Dollar sign ($) is used to make absolute cell references
- β Several chart types are available for visualizing data
π‘ Essential Functions:
| Function | Purpose | Example |
|---|---|---|
=SUM() | Add values | =SUM(A1:A10) |
=AVERAGE() | Find average | =AVERAGE(B1:B5) |
=MAX() | Find largest value | =MAX(C1:C20) |
=MIN() | Find smallest value | =MIN(D1:D15) |
=COUNT() | Count numbers | =COUNT(E1:E50) |
β οΈ Common Mistakes to Avoid:
- β Writing
D2=A2*B2instead of=A2*B2(formula must start with =) - β Forgetting to use $ for absolute references when needed
- β Not formatting phone numbers as text (leading zeros disappear)
- β Confusing operator precedence (remember: ^ then */ then +-)
- β Selecting wrong data ranges for charts
- β Not using functions when working with large data sets
- β Copying formulas without checking cell references
- β Not adding labels and titles to charts
π Tips for Success:
- Plan Before You Start: Think about your worksheet structure before entering data
- Use Functions: Don't write long formulas when functions can do it easier
- Test Your Formulas: Enter sample data and verify results
- Format Appropriately: Make your worksheets easy to read
- Label Everything: Use clear headers and titles
- Save Regularly: Don't lose your work!
- Practice: The more you practice, the better you'll become
- Explore: Try different features and functions
π Quick Reference Card:
| Task | Shortcut/Method |
|---|---|
| Copy | Ctrl + C |
| Paste | Ctrl + V |
| Undo | Ctrl + Z |
| Redo | Ctrl + Y |
| Save | Ctrl + S |
| Format Cells | Ctrl + 1 or Right-click β Format Cells |
| Go to A1 | Ctrl + Home |
| Select All | Ctrl + A |
| Bold | Ctrl + B |
| Italic | Ctrl + I |
| Underline | Ctrl + U |